import React, { Component } from 'react';
import {
  View,
  //Text,
  StyleSheet,
  Modal,
  ActivityIndicator
} from 'react-native';
//TODO loading加载框
export default class WaitingModal extends Component {
  render() {
    return (
      <Modal transparent={true} onRequestClose={()=>{}} visible={(this.props as any).show}>
        <View style={styles.mainViewStyle}>
          <View style={styles.contentViewStyle}>
            {/*<Text style={styles.textStyle}>*/}
            {/*  {this.props.prompt}*/}
            {/*</Text>*/}
            <ActivityIndicator animating={true} color={'#0155bc'} size={24} style={{marginTop:3}}/>
          </View>
        </View>
      </Modal>
    );
  }
}

const styles = StyleSheet.create({
  mainViewStyle:{
    flex:1,
    alignItems:'center',
    justifyContent:'center',
    backgroundColor:'rgba(0,0,0,0.1)'
  },
  contentViewStyle:{
    width:30,
    height:30,
    backgroundColor:'white',
    borderRadius:15,
  },
  textStyle:{
    fontSize:13,

  }
});
